package reflect;

import reflect.annotations.AutoRunClass;

public class ReflectDemo10 {
    public static void main(String[] args) throws ClassNotFoundException {
        Class cls=Class.forName("reflect.Person");
//        boolean isAnnotationPresent(Class annotationClass)该方法用于判断反射对象是否被指定的注解标注
        if (cls.isAnnotationPresent(AutoRunClass.class)){
            System.out.println("被标注了");
        }else {
            System.out.println("没有被标注");
        }
    }
}
